<ol class="breadcrumb" style="margin-top: 5px;">
    <li class="breadcrumb-item">
        <a href="{:urlBuild('!.sconst')}">
            <i class="{$setting.icon}" aria-hidden="true"></i> {$setting.descrip}
        </a>
    </li>
    <li class="breadcrumb-item active">数据新增</li>
</ol>
<form method="post" action="{:url('sconst/save')}">
    <p class="lead text-info">概要数据</p>
    <div class="card">
        <div class="card-body">
            <div class="form-group row">
                <label for="ipt_scope" class="col-sm-2 col-form-label">作用域码</label>
                <div class="col-sm-10">
                    <input type="text" name="scope" value="{$data.scope|default=''}" class="form-control" id="ipt_scope" placeholder="作用域码" required>
                </div>
            </div>
            <div class="form-group row">
                <label for="ipt_scope_desc" class="col-sm-2 col-form-label">作用域名称</label>
                <div class="col-sm-10">
                    <input type="text" name="scope_desc" value="{$data.scope_desc|default=''}" class="form-control" id="ipt_scope_desc" placeholder="作用域名称" required>
                </div>
            </div>
        </div>
    </div>
    <p class="lead text-warning">明细数据</p>
    <table class="table table-bordered js__form">
        <thead>
        <tr class="bg-info"><th>#</th><th>常量键名</th><th>常量值</th><th>备注</th></tr>
        </thead>
        <tbody>
        {if condition="isset($detail)"}
        {$detail}
        {else}
        <tr><td data-no="1">1</td>
            <td><input type="text" name="const_key" class="form-control"></td>
            <td><input type="text" name="const_value" class="form-control"></td>
            <td><input type="text" name="remark" class="form-control"></td>
        </tr>
        {/if}
        </tbody>
    </table>
    <p class="text-right">
        <button class="btn btn-info btn-sm" id="row_add_btn" type="button">
            <i class="fa fa-plus"></i> 新增列
        </button>
        <button class="btn btn-warning btn-sm" id="row_del_btn" type="button">
            <i class="fa fa-minus"></i> 删除列
        </button>
    </p>
    <p class="text-center">
        <button class="btn btn-success" id="rows_save_btn" type="submit">
            <i class="fa fa-save"></i> 保存数据
        </button>
    </p>
</form>